﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using RoccaStore.Data;
using RoccaStore.Services;

namespace RoccaStore.Services
{
    public class FileSendService : ServiceBase<IFileSendRepository>, IFileSendService
    {
        public FileSend GetByID(int id)
        {
            return Repository.GetByID(id);
        }

        public List<FileSend> GetBySlug(string slug)
        {
            return Repository.GetBySlug(slug);
        }

        public int Save(FileSend sendInfo)
        {
            sendInfo.IP = HttpContext.Current.Request.UserHostAddress;
            return Repository.Save(sendInfo);
        }
    }
}
